@(task: Task, isEditable: Boolean = true)

<li data-task-id="@task.id">
    
    @if(isEditable) {
        <input class="done" type="checkbox" @(if(task.done) "checked") />
    }
    
    <h4>@task.title</h4>
    
    @task.dueDate.map { date =>
        <time datetime="@date">@date.format("MMM dd yyyy")</time>
    }
    
    @task.assignedTo.map { user =>
        <span class="assignedTo">@user</span>
    }
    
    @if(isEditable) {
        <a class="deleteTask" href="@routes.Tasks.delete(task.id.get)">Delete task</a>
        <span class="loader">Loading</span>
    }
    
</li>
